package com.match.competition_sub.controller;


import com.match.commonutils.Result;
import com.match.competition_sub.entity.department.OneSubject;
import com.match.competition_sub.service.CompetitionDepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author AdiosF
 * @since 2021-09-21
 */
@RestController
@RequestMapping("/competition_sub/competition-department")

@Api(tags = "竞赛部门管理模块")
public class CompetitionDepartmentController {
    @Autowired
    private CompetitionDepartmentService competitionDepartmentService;

    @ApiOperation("竞赛部门查询接口")
    @GetMapping("/findAllDepartment")
    public Result findAllDepartment(){
        List<OneSubject> list = competitionDepartmentService.findAllDepartment();
        return Result.ok().data("departList",list);
    }
}

